﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<link rel="stylesheet" type="text/css" href="/detail/style/css/index.css" />
	<script type="text/javascript">

		/**
		 * 通知服务员结账
		 * @param deskID
		 */
		function infoWaiter(deskID)
		{
			alert('已经通知服务员过来带您去前台结账!');
			location.href = '/infoWaiter/' + deskID;
		}
	</script>
</head>

<body style="text-align: center">
	<div id="all">
		<div id="menu">
			<!-- 餐车div -->
			<div id="count">
				<table align="center" width="100%">
					<tr height="40">
				 		<td align="center" width="20%">菜名</td>
				 		<td align="center" width="20%">单价</td>
				 		<td align="center" width="20%">数量</td>
				 		<td align="center" width="20%">小计</td>
				 	</tr>


					<tr height="60" th:each="cart: ${carts}">
						<td align="center" width="20%" th:text="${cart.food.title}"></td>
						<td align="center" width="20%">&yen;[[${cart.food.price}]]</td>
						<td align="center" width="20%" th:text="${cart.num}"></td>
						<td align="center" width="20%" th:text="${cart.total}"></td>
					</tr>


					<tr>
						<td colspan="6" align="right">总计:
							<span style="font-size:36px;">&yen;</span>
							<label id="counter" style="font-size:36px" th:text="${totalPrice}"></label>
						</td>
					</tr>

					<tr>
						<td colspan="6" style="margin-left: 100px; text-align: center;"align="right">
							<input type="hidden" name="bId" value="">
							<input type="button" value="结账" class="btn_next" lang="3" th:onclick="|infoWaiter(${desk.id})|"/>
						</td>
					</tr>
				</table>
			</div>
		</div>

	</div>
</body>
</html>
